{include file="header.html"}
<body class="body-main">
<form method="post">
<input type="hidden" name="con[cid]" value="{$cid|default:0}">
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="0" id="config1"  class="tableConfig">
	<tr class="tdbg">
			  <td align="right" class="config_td_first">网站分组：</td>
			  <td class="tdbg"><font color="blue">{$classname}</font></td>
			</tr>
		<tr>
		<td align="right" width="120">蜘蛛防火墙开关：</td>
		<td class="icheck_radios"><label><input type="radio" name="con[web_robot_ban]" value="1" {if $web_robot_ban} checked{/if}>开启</label>
		<label><input type="radio" name="con[web_robot_ban]" value="0" {if !$web_robot_ban} checked{/if}>关闭</label>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" align="center" cellpadding="8" cellspacing="1">
			<tr align="center">
			  <td width="110" align='center' class="title_bg">蜘蛛名称</td>
			  <td align='center' class="title_bg">屏蔽</td>
			  <td width="110" align='center' class="title_bg">蜘蛛名称</td>
			  <td align='center' class="title_bg">屏蔽</td>
			  <td width="110" align='center' class="title_bg">蜘蛛名称</td>
			  <td align='center' class="title_bg">屏蔽</td>
			</tr>
			<?php $i=1; ?>
			{foreach $robot_list as $key=>$vo}
			<?php if($i==1):?><tr><?php endif; ?>
				<td align="right"><label for="in_{$key}">{$vo}</label></td>
				<td align='center'><input type="checkbox" name="con[web_robot_ban_list][]" id="in_{$key}" value="{$key}" {if $web_robot_ban_list && in_array($key,$web_robot_ban_list)} checked{/if} /></td>
					<?php if($i!=$this->_var['list_last'] and ($i%3==0)):?>
						</tr><tr>
					<?php endif; ?>
				<?php $i++; ?>
			{/foreach}
			<tr bgcolor='#ffffff'>
				<td colspan="6"><label><input name="chkall" type="checkbox" id="chkall" onclick=checkall(this.form) value="checkbox"> 全选/反选</label></td>
			</tr>
			</table>
		</td>
	</tr>
    <tr class="tdbg">
	  <td>&nbsp;</td>
      <td><button type="submit" id="dosave" class="button button_submit">保存设置</button></td>
    </tr>
	</table>
	</form>
<script>
$("#dosave").click(function(){
	$(this).html('正在保存...');
	$.ajax({
		type:"post",
		url:"?admin-robot-ban_update",
		data:$("form").serialize(),
		dataType:'json',
		timeout:28000,
		global:false,
		success:function(data){
			if(data.status==1){
				showAlert('success',data.info);
				setTimeout(function(){ var win = art.dialog.open.origin;win.location.reload(); top.art.dialog.list['openifrm'].close(); },2000);
			}else{
				showAlert('error',data.info);
			}
		}
	});
 return false;
});
</script>
</body>
</html>